<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>回帖</title>
<link rel="stylesheet" type="text/css" href="css/common.css">
</head>
<body>
	<jsp:include page="header.jsp"></jsp:include>
	<nav>
		<div>
			<a href="index.do">首页</a><span>>></span>
			<a href="topic.do?sid=${sid }&page=1">${sname }</a><span>>></span>
			<a href="replay.do?tid=${tid }&page=1">${ttitle }</a>
		</div>
	</nav>
	<table border="1">
		<tr>
			<td>
				<div><img src="icons/${topic.userIconName }"></div>
				<div><a href="user.do?uid=${topic.userId }">${topic.usermname }</a></div>
				<div>注册日期：${topic.regDateStr }</div>
			</td>
			<td>
				<div>${topic.topicTitle }</div>
				<div>${topic.topicContent }</div>
				<div><span>最后编辑时间：${topic.lastEditDateStr }</span></div>
				<div><span>被顶：${topic.upCount }</span><span>被踩：${topic.stompCount }</span></div>
			</td>
		</tr>
		<c:forEach var="replay" items="${replayList }">
			<tr>
				<td>
					<div><img src="icons/${replay.userIconName }"></div>
					<div><a href="user.do?uid=${replay.userId }">${replay.usermname }</a></div>
					<div>注册日期：${replay.regDateStr }</div>
					<div>${replay.replayLayerNum }楼</div>
				</td>
				<td>
					<div><span>${replay.criStr }</span><span>${replay.replayContent }</span></div>
					<div><span>最后编辑时间：${replay.lastEditDateStr }</span></div>
				</td>
			</tr>
		</c:forEach>
	</table>
	<div class="pageCon">
		<a href="replay.do?tid=${tid }&page=1">第一页</a>
		<c:forEach var="page" items="${pageList }">
			<c:if test="${page!=currentPage }">
				<a href="replay.do?tid=${tid }&page=${page }">[${page }]</a>
			</c:if>
			<c:if test="${page==currentPage }">
				<span>[${page }]</span>
			</c:if>
		</c:forEach>
		<a href="replay.do?tid=${tid }&page=${lastPage }">最后一页</a>
	</div>
	<jsp:include page="footer.jsp"></jsp:include>
</body>
</html>